$(function(){
	
	/*内页幻灯片*/
	if($('.js-slider-inside').length > 0){
		$('.js-slider-inside').flexslider({
			directionNav: true,
			pauseOnAction: false
		});				
	}
	
	/*导航栏切换*/
	$('.header-ban li').each(function(){
		var me = $(this),
			siblings = me.siblings();	
		me.click(function(){
			me.addClass('sel');
			siblings.removeClass('sel');	
		});
	});
	
	/*标题栏切换*/
	$('.ht1-item').click(function(){
		var me = $(this),
			index = me.index();
			siblings = me.siblings('.ht1-item'),
			content = me.closest('.ht1-container').find('.ht1-con');	
		if(me.hasClass('curr')){return;}
		me.addClass('curr');
		siblings.removeClass('curr');
		content.addClass('dis');
		content.eq(index).removeClass('dis');
	});
	
	/*理财产品页-标题栏切换*/
	$('.wm-pro-t').click(function(){
		var me = $(this),
			_index = me.index(),
			$con = me.closest('.wm-container').find('.wm-pro-con');
		if(me.hasClass('sel')){
			return;
		}	
		me.addClass('sel');
		$con.addClass('dis');
		$con.eq(_index).removeClass('dis');
		me.siblings('.wm-pro-t').removeClass('sel');
	});
	
	
	/*实时更新时间*/
	window.setInterval(showTime, 1000);
	$timeSpan = $('#show_date');
	days = ['一','二','三','四','五','六','天'];
	
	/*初始化系统时间*/
	showTime();
	function showTime(){
		var tt = new Date(),
			date = tt.toLocaleDateString(),
			day = '星期'+days[tt.getDay()-1],
			time = tt.toLocaleTimeString();	
		$timeSpan.html(date+'  '+day+' '+time);
	}
});